<template>
  <div class="back-top">
    <div class="icon" @click="backTopFun">
      <img src="~/assets/img/back-top.svg" alt="" />
    </div>
    <div class="erwei">
      <img v-if="lang != 'zh'" src="~/assets/img/km-download.png" alt="" />
      <img v-if="lang == 'zh'" src="~/assets/img/zh-download.png" alt="" />
      <p>
        {{ $t('Scan_QR_code') }}
      </p>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      lang: 'zh' //语言,默认为中文
    };
  },
  created() {
    this.lang = this.$route.params.lang ? this.$route.params.lang : 'zh';
  },
  methods: {
    /* 返回顶部 */
    backTopFun: function() {
      this.$emit('backTopFun', true);
    }
  }
};
</script>

<style scoped lang="scss">
.back-top {
  position: fixed;
  left: 50%;
  bottom: 120px;
  z-index: 99;
  transform: translateX(-50%);
  margin: 0px 0 0 440px;
  .icon {
    cursor: pointer;
    width: 40px;
    height: 40px;
    box-sizing: border-box;
    padding: 8px 0;
    border-radius: 8px;
    border: 1px solid rgba(12, 12, 28, 0.08);
    margin: 0 0 16px 0;
    img {
      width: 24px;
      margin: 0 auto;
    }
  }
  .erwei {
    width: 80px;
    text-align: center;
    img {
      width: 80px;
      margin: 0 0 6px 0;
    }
    p {
      font-size: 12px;
      color: #0c0c1c;
    }
  }
}
</style>
